function [signalConfig, receiverConfig] = GenConfigDefault()
    % 生成信号生成配置
    signalConfig = configSignalGeneration();
    
    % 生成接收机环路配置
    receiverConfig = configReceiverLoops();

    % 确保config文件夹存在
    if ~exist('config', 'dir')
        mkdir('config');
    end

    % 处理不支持的多维数组（针对antennas.positions）
    if isfield(signalConfig, 'antennas') && isfield(signalConfig.antennas, 'positions')
        % 将多维positions转换为结构体数组
        pos = signalConfig.antennas.positions;
        [m,n] = size(pos);
        posStruct = struct();
        for i = 1:m
            posStruct(i).coords = pos(i,:);  % 每行作为一个向量存储
        end
        signalConfig.antennas.positions = posStruct;  % 替换原字段
    end

    % 同理处理接收机配置中可能的多维数组（如果有）
    if isfield(receiverConfig, 'antennas') && isfield(receiverConfig.antennas, 'positions')
        pos = receiverConfig.antennas.positions;
        [m,n] = size(pos);
        posStruct = struct();
        for i = 1:m
            posStruct(i).coords = pos(i,:);
        end
        receiverConfig.antennas.positions = posStruct;
    end

    % 生成xml文件
    signalConfigPath = fullfile('config', 'signalConfigDefault.xml');
    writestruct(signalConfig, signalConfigPath);
    
    receiverConfigPath = fullfile('config', 'receiverConfigDefault.xml');
    writestruct(receiverConfig, receiverConfigPath);
end